/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidade;

import util.MobCatUtil;

/**
 *
 * @author Victorino
 */
public class Registro {

    public final int id;
    public final String nome;
    public final String endereco;
    public final String telefone;
    public final String telefone2;
    public final int peso;
    public final String bairro;
    public final String email;
    public final String resumo;
    public final String site;

    public Registro(String wsResult) {

        String[] strs = MobCatUtil.split(wsResult, "|");
        id = Integer.parseInt(strs[0]);
        nome = strs[1];
        peso = Integer.parseInt(strs[2]);
        if (strs.length > 3) {
            endereco = strs[3];
            telefone = strs[4];
            telefone2 = strs[5];
            bairro = strs[6];
            email = strs[7];
            resumo = strs[8];
            site = strs[9];
        } else {
            endereco = "";
            telefone = "";
            telefone2 = "";
            bairro = "";
            email = "";
            resumo = "";
            site = "";
        }

    }
}
